package com.battle.pojo.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.handlers.JacksonTypeHandler;
import com.battle.pojo.converter.StringListConverter;
import com.battle.pojo.enums.WarCaseStudyDetailsStatusEnum;
import com.battle.pojo.enums.WarCaseStudyUserTypeEnum;
import jakarta.persistence.Column;
import jakarta.persistence.Convert;
import jakarta.persistence.Entity;
import lombok.Data;
import nirvana.core.domains.ann.AccEntity;
import nirvana.core.domains.entity.DomainBaseEntity;
import nirvana.core.domains.enums.EntityType;

import java.time.LocalDateTime;
import java.util.List;

/**
 * @author anni.zhu
 * @author anni.zhu@king-v.com
 * Created in 2024/8/22 14:33
 * 战例研讨用户
 */

@Data
@TableName(value = "WAR_CASE_STUDY_USER",autoResultMap = true)
@Entity(name = "WAR_CASE_STUDY_USER")
@AccEntity(value = "战例研讨用户", type = EntityType.SERVICE_ENTITY)
public class WarCaseStudyUser extends DomainBaseEntity<WarCaseStudyUser> {
    /**
     * 战例id
     */
    @Column()
    private Long caseId;

    /**
     * 研讨id
     */
    @Column(nullable = false)
    private Long studyId;

    /**
     * 发起人id
     */
    @Column(nullable = false)
    private Long initiatorId;

    /**
     * 用户id
     */
    @Column(nullable = false)
    private Long userId;

    /**
     * 状态：0待处理 1已通过 2已拒绝
     */
    @Column()
    private WarCaseStudyDetailsStatusEnum status;

    /**
     * 处理时间
     */
    @Column()
    private LocalDateTime waitTime;

    /**
     * 报名记录类型： 0自己报名 1被邀请
     */
    @Column()
    private WarCaseStudyUserTypeEnum type;
}
